package com.example.jnet;

import com.example.jnet.config.ServerConfig;
import com.example.jnet.network.TcpServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
@ComponentScan(basePackages = {"com.example.jnet"})
public class DemoApplication {

	public static void main(String[] args) {
		ConfigurableApplicationContext context = SpringApplication.run(DemoApplication.class, args);
		TcpServer tcpServer = context.getBean(TcpServer.class);
		tcpServer.start();
	}

}
